package com.bbex.controller;


import com.bbex.pojo.GlobalMessageResponseVo;
import com.bbex.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import reactor.core.publisher.Mono;

import java.util.List;
import java.util.Map;

/**
 * Title :
 * Description : @获取字典@
 * Copyright (C) zw.FinTec
 *
 * @author department:研发部
 * @version 修改历史:
 *          修改人 修改日期 修改描述
 *          -------------------------------------------<
 */
@Controller
@RequestMapping("/bbuni/sysDict")
public class SysDictController {

    @Autowired
    private DictService dictService;
    /**
     *根据字典大类编码查询字典明细
     * @param itemCode
     * @return
     */
    @RequestMapping("/getsDetailsByDictItemCode")
    @ResponseBody
    public Mono getsDetailsByDictItemCode(String itemCode){
        List<Map> dictDetailList =dictService.getDictDetailByItemCode(itemCode);
        return  Mono.just(GlobalMessageResponseVo.newSuccessInstance(dictDetailList));
    }
}